IModel.RelateWhere method

Namespace: NextDesign.Core

Description

Returns a collection of all the associated instances that have been added, associated with the given model in all lookup fields that match the specified conditions of this instance. If a deleted model or temporary proxy is specified for the model to be associated, association will not be performed. Returns an empty collection if no association was made.

The reference field to be associated can be arbitrarily determined by the evaluation function. However, even if it matches the evaluation function, if the field satisfies the following conditions, it will not be associated and will end normally. ・ When the path constraint of the field is violated · If the field type is not compatible with the given model ・ When the field multiplicity is exceeded - If the following fields cannot be operated -Product line feature assignment field -Fields with System.Core tag

argument

Name Type Description
opposite IModel The model to associate
null cannot be specified.
predicate Func < IField, bool > Field evaluation function
1st argument: field
Return value: True when related in the corresponding field

If null is specified, this instance Associates the given model with all reference fields that can be associated with the given model of and returns a collection of all the associated instances that have been added.

Return value

  • IRelationshipCollection

Exception

Name Exception Class Description
Invalid argument ExtensionArgumentException If null is specified for opposite
Illegal operation ExtensionInvalidOperationException If the model itself is a deleted proxy or temporary proxy